package de.baumann.browser.present.duobao

import de.baumann.browser.api.OdinObserver
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.duobao.IDuoBaoPhoneView
import de.baumann.browser.model.sendSms
import de.baumann.browser.model.yz

class DuoBaoPhonePresenter : BasePresenter<IDuoBaoPhoneView>() {
    fun duobaoSendSms() {
        sendSms(view!!.telNum)
                .subscribe(object : OdinObserver<Any>(view) {
                    override fun onSuccess(data: Any?) {

                    }
                })
    }

    fun duobaoyz() {
        yz(view!!.telNum, view.smsCode)
                .subscribe(object : OdinObserver<Any>(view) {
                    override fun onSuccess(data: Any?) {
                        view?.bdcg()
                    }
                })
    }
}